﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SharingCenter.Web.Classes;

namespace SharingCenter.Web.Mod.Groups.Albums
{
    public partial class Organize : GroupsPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ParseGroupIdFromQueryString();
            HasRights(groupId, Profile.UserId);
            AlbumOrganize1.AlbumId = new Guid(Request.QueryString["aid"]);
            AlbumOrganize1.AlbumUpdated += new EventHandler<EventArgs>(AlbumOrganize1_AlbumUpdated);
            //GroupHeader1.SubTitle = "修改相片标题";
        }

        void AlbumOrganize1_AlbumUpdated(object sender, EventArgs e)
        {
            SetTopMostMessage("已经完成修改。", true);
            Response.Redirect(string.Format("Album.aspx?id={0}&aid={1}", groupId, Request.QueryString["aid"]));
        }

        protected void DoUpdate(object sender, EventArgs e)
        {
            AlbumOrganize1.UpdateAlbum();
        }
    }
}
